package com.cysyz.mylib.dao.engine;



import java.io.Serializable;
import java.util.List;

public interface PersistenceEngine {
	void persist(Object entity);

	void remove(Object entity);
	
	@SuppressWarnings("rawtypes")
	void removeByCollection(List list);
	
	void merge(Object entity);

	<T> T get(Class<T> entityClass, Serializable entityID);

	<T> T getReference(Class<T> entityClass, Serializable entityID);

	Query createQuery(String ql);
	
	SQLQuery createSQLQuery(String sql);

	SQLQuery createSQLQuery(String sql, String mappingInfo);

	ClassMetadata getClassMetadata(Class entityClass);


}
